﻿<phone:PhoneApplicationPage 
    x:Class="ThuPhap.ChooseColorPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="728" d:DesignWidth="480"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    toolkit:TiltEffect.IsTiltEnabled="True"
    xmlns:c4fToolkit="clr-namespace:Coding4Fun.Phone.Controls;assembly=Coding4Fun.Phone.Controls"
    shell:SystemTray.IsVisible="False" xmlns:my="clr-namespace:ThuPhap.Controls" Background="White" BorderBrush="Black" Padding="1">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="CHOOSE COLOR" Style="{StaticResource PhoneTextNormalStyle}" />
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid VerticalAlignment="Top" x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="10*" />
            </Grid.RowDefinitions>
            <c4fToolkit:ColorPicker BorderThickness="0" VerticalAlignment="Top" x:Name="ColorPicker" Grid.Row="1" Width="450" Height="450" Margin="0" Style="{StaticResource customStyle}" Background="{x:Null}"></c4fToolkit:ColorPicker>
            <Grid Margin="150,290,6,-102" Width="300" Height="85" Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Border Grid.Row="0" Grid.Column="0" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Black" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>
                <Border Grid.Row="0" Grid.Column="1" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Gray" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="0" Grid.Column="2" Background="White" Width="40" Height="40">
                    <Rectangle Fill="DarkRed" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="0" Grid.Column="3" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Red" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="0" Grid.Column="4" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Orange" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="0" Grid.Column="5" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Yellow" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="1" Grid.Column="0" Background="White" Width="40" Height="40">
                    <Rectangle Fill="White" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>
                
                <Border Grid.Row="1" Grid.Column="2" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Lime" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="1" Grid.Column="3" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Turquoise" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="1" Grid.Column="4" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Blue" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="1" Grid.Column="5" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Chocolate" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="1" Grid.Column="6" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Brown" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="1" Grid.Column="1" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Pink" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

                <Border Grid.Row="0" Grid.Column="6" Background="White" Width="40" Height="40">
                    <Rectangle Fill="Purple" Tap="Rectangle_Tap"  Stroke="Black" Margin="0" StrokeThickness="1" Cursor="Hand"  Width="38" Height="38" >
                    </Rectangle>
                </Border>

            </Grid>
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" BackgroundColor="{StaticResource PhoneAccentColor}">
            <shell:ApplicationBarIconButton IconUri="/Resources/Images/appbar.check.rest.png" Text="ok" Click="ApplicationBarIconButton_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
